<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../vue.js"></script>
</head>
<body>
<div id="app">
    <table>
        <tbody>
        <tr is="row"></tr>
        <tr is="row"></tr>
        <tr is="row"></tr>
        </tbody>
    </table>
</div>

<script>
    Vue.component('row',{
        //子组件中data必须是函数,不能是数据
        data: function () {
            return {
                content:"this is content"
            }
        },
        template:'<tr><td>{{content}}</td></tr>'
    })
    var vm = new Vue({
        el: "#app",
        data: {}
    })
</script>
</body>
</html>